import type {RouteRecordRaw} from "vue-router"
import setingRoutes from "./setting"
import userRoutes from "./user"
import path from "path"
const routes:RouteRecordRaw[] = [
       {
        path:"/login",
        component:()=>import("../views/login/login.vue")
        
       
    },
 
    {
        path:"/",
        component:()=>import('../layout/index.vue'),
        children:[
        {
            path:"dashboard",
            components:{
                default:()=>import("../views/dashboard/index.vue")
            },
            meta:{
                title:"仪表盘"
            }
           
        },
        {
            path:"/banner",
            component:()=>import("@/views/banner/index.vue"),
            meta:{
                title:"轮播图"
            }
    }
      ]
    },
    ...userRoutes,
    ...setingRoutes,

    {
        path:"/workbench",
        component:()=>import("@/layout/index.vue"),
        children:[
            {
               path:"charts",
            component:()=>import("@/views/workbench/charts.vue"),
            meta:{
                title:"可视化图标"
            },
        },  
         {
        path:"rich-editor",
         component:()=>import("@/views/workbench/rich.editor.vue"),
         meta:{
             title:"富文本编辑器"
         },
     },   {
        path:"map",
         component:()=>import("@/views/workbench/map.vue"),
         meta:{
             title:"地图"
         },
     }
        ]
    },

    { 
        path:'/:pathMatch(.*)*', 
         component:()=>import("../views/Notfount/index.vue"),
    },

]


export default routes